#include<iostream.h>
#include"matrix.h"

int main()
{
	int x,n,ch;

	do
	{
		cout<<"\n\t\t M A I N    M E N U";
		
		cout<<"\n\t 1.  POWER METHOD";
		cout<<"\n\t 2.  INVERSE POWER METHOD";
		cout<<"\n\t 3.  SHIFTED POWER METHOD";
		cout<<"\n\t 4.  SHIFTED INVERSE POWER METHOD";
		cout<<"\n\t 5. EXIT";

		cout<<"\n\t Enter Your Choice : ";
		cin>>n;

		switch(n)
		{
			
			case 1 : {
				 cout<<"\n Enter order of matrix(nxn) : ";
				 cin>>x;

				 matrix A(x,x);
				 
				 gen_matrix(A);
				 A.power();

				 break;
				 }

			case 2 : {
				 cout<<"\n Enter order of matrix(nxn) : ";
				 cin>>x;

				 matrix A(x,x);
				 
				 gen_matrix(A);
				 A.inverse_power();

				 break;
				 }
			
			case 3 : {      
				 cout<<"\n Enter order of matrix(nxn) : ";
                                 cin>>x;

                                 matrix A(x,x);
                                 
                                 gen_matrix(A);
				 A.shifted_power();

                                 break;
                                 }

			
			case  4 : {
				 cout<<"\n Enter order of matrix(nxn) : ";
                                 cin>>x;

                                 matrix A(x,x);
                                 
				 gen_matrix(A);
				 A.shifted_inverse_power();

                                 break;
                                 }
				 
			
			case 5 : cout<<"\n Terminated Successfully...\n";


		}
	}while(n!=5);
	
	return 0;
}
